Skip to content

Add dynamic type support - #20342

Closed
tzef wants to merge 1 commit into
wordpress-mobile:feature/19411-add-lock-screen-stats-widgetsfrom
tzef:feature/beemotrial/lockscreen-widgets-dynamcitype
Closed

Add dynamic type support#20342
tzef wants to merge 1 commit into
wordpress-mobile:feature/19411-add-lock-screen-stats-widgetsfrom
tzef:feature/beemotrial/lockscreen-widgets-dynamcitype

Conversation

@tzef

@tzef tzef commented Mar 16, 2023

Copy link
Copy Markdown
Contributor

This PR is for improving the comments for previous PR #20312

  1. Add new feature flag for lock screen widgets in Jetpack  #20309 (✅ Approved)
  2. Implement lock screen widgets UI #20312 (✅ Approved)
  3. Add dynamic type support #20342 (TBD) 👈 you're here!
  • Add dynamic type support and change layout if needed
  • Raise and track the discussion about localization concerns and dynamic-type support
  1. Add localizable string for "Views Today" title #20353 (✅ Approved)
  2. [BugFix] Fix widget of home screen for WordPress disappeared #20371 (✅ Approved)
  3. Extract content logic to config from lock screen widget #20317 (✅ Approved)
  4. Create a standalone TimeLineProvider and TimelineEntry for the lock screen  #20368 (✅ Approved)
  5. Implement view for logged-out, no-site, and no-data status #20399 (✅ Approved)
  6. Notify to reload the timelines for lock screen widget #20405 (✅ Approved)
    (Confirm the data display on UI correctly in this phase)
  7. Implement event tracking for the new lock screen widget  #20422 (✅ Approved)
  8. Disable lockScreenWidget feature flag #20427 (In Reviewing)

Description

To add dynamic type support to the widget view, we need

  • First, replace the fixed-size font with the dynamic font. I chose the font with the same size as the design based on the typography document.

  • Second, add a horizontal layout for the size category larger than large, as we discussed in PR #20312 . The existing font already be the maximum font size, so I change the layout to get available spaces as the temporary solution, and I will compose a post to clarify with the design team in the meanwhile.

image

Testing instructions

Given added the widget to the lock screen, changed the size category in Settings > Display and Brightness > Text Size
The font size and layout should be changed based on the font size (the result could refer to the above preview screenshot)

Regression Notes

  1. Potential unintended areas of impact
    The UI representation for today views the widget in the lock screen

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    Check the design is still good (I will double confirm with the designer)

  3. What automated tests I added (or what prevented me from doing so)
    N/A

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@tzef

tzef commented Mar 16, 2023

Copy link
Copy Markdown
Contributor Author

Hi @staskus
I already write the topic to ask designer's input pcdRpT-1XH-p2#comment-3621

As I mentioned in the example in the post, the dynamic type solution does not work for some languages with long field names.

I proposed an alternative solution to hide the website for a larger font size set up, but that might need some times for discussion. Therefore, I suggest we focus on other tasks first, and I will submit another PR for UI update once we have a better solution.

What do you think?

@staskus

staskus commented Mar 16, 2023

Copy link
Copy Markdown
Contributor

Hi @staskus I already write the topic to ask designer's input pcdRpT-1XH-p2#comment-3621

As I mentioned in the example in the post, the dynamic type solution does not work for some languages with long field names.

I proposed an alternative solution to hide the website for a larger font size set up, but that might need some times for discussion. Therefore, I suggest we focus on other tasks first, and I will submit another PR for UI update once we have a better solution.

What do you think?

  1. Be careful sharing related links outside of GitHub, I edited your comment to obscure it
  2. Yes, sounds good. As I mentioned in the previous PR, I recognize that there's not a lot of space for the text to expand. Thanks for researching for potential solutions. 👍

Change to horizontal layout for larger size category
@tzef
tzef force-pushed the feature/beemotrial/lockscreen-widgets-dynamcitype branch from 6582fdb to 79ae005 Compare March 17, 2023 01:28
@tzef tzef changed the title Add dynamic type support and add localizable string for footer label Add dynamic type support and add horizontal layout for larger size-category Mar 17, 2023
@tzef tzef changed the title Add dynamic type support and add horizontal layout for larger size-category Add dynamic type support Mar 17, 2023
@tzef

tzef commented Mar 17, 2023

Copy link
Copy Markdown
Contributor Author

Be careful sharing related links outside of GitHub, I edited your comment to obscure it
Whoops! Sorry for my oversight. Thank you for correcting and helping me edit it.

Yes, sounds good. #20312 (comment), I recognize that there's not a lot of space for the text to expand. Thanks for researching for potential solutions. 👍

Great, then I think we can move on to the next task based on the existing layout. I will revisit this feature once we have a better solution from further discussion.

I have extracted the translation part from this pull request to another one: #20353.
Please help to review it. Thank you.

@staskus

staskus commented Mar 17, 2023

Copy link
Copy Markdown
Contributor

@tzef Thanks. I will take a look at another PR. This PR could be switched to a "Draft" while its direction is unclear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants